#include <iostream>
#include <string>
#include "../Robot.h"
#include "AfficheurRobot.h"
#include "../etats/EtatRobot.h"
#include "../etats/EtatAVideFaceObstacle.h"

void AfficheurRobot::afficher(Robot* r) {
	cout << "-----------------------------------------------------------------" << endl;
	cout << "\t\t* Etat du Robot : " << r->getEtatCourant() << endl;
	cout << "\t\t* Direction : " << r->getDirection() << endl;
	cout << "\t\t* Position : x=" << r->getPosition()->getX() << "\t y="
			<< r->getPosition()->getY() << endl;

	if (r->getEtatCourant() == "EtatAVideFaceObstacle" || r->getEtatCourant()
			== "EtatEnChargeFaceObstacle") {

		cout << "\t\t* Hauteur de l'obstacle : " << r->getObstacle()->getHauteur()
				<< endl;
	}

	if (r->getEtatCourant() == "EtatEnCharge" || r->getEtatCourant()
			== "EtatEnChargeFaceObstacle") {
		cout << "\t\t* Poids de l'objet :" << r->getObjet()->getPoids() << endl;
	}
	cout << "-----------------------------------------------------------------" << endl;

}

void AfficheurRobot::afficher(string message) {
	cout << "\t\t# "<<message << endl;
}
